//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.study.Enum;

public enum ResultJsonEnum {
    SUCCESS(200, "成功"),
    FAIL(500, "失败"),
    UNDEFIND(-1, "未定义");

    private String message;
    private Integer value;

    private ResultJsonEnum(Integer value, String message) {
        this.value = value;
        this.message = message;
    }

    public static ResultJsonEnum getResultEnum(int index) {
        ResultJsonEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            ResultJsonEnum resultJsonEnum = var1[var3];
            if (resultJsonEnum.getValue() == index) {
                return resultJsonEnum;
            }
        }

        return UNDEFIND;
    }

    public static String getMessage(int index) {
        ResultJsonEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            ResultJsonEnum resultJsonEnum = var1[var3];
            if (resultJsonEnum.getValue() == index) {
                return resultJsonEnum.getMessage();
            }
        }

        return UNDEFIND.getMessage();
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }
}
